{extend name="public:_base" /}
{block name="css"}
<link rel="stylesheet" type="text/css" href="__STATIC__/admin/uploadify/uploadify.css">
{/block}
{block name="js"}
{load href="__STATIC__/admin/hui/lib/My97DatePicker/4.8/WdatePicker.js" /}
{include file="public/_validform"}
<!--上传配置 -->
<script src="__STATIC__/admin/uploadify/jquery.uploadify.min.js" type="text/javascript"></script>
<script src="__STATIC__/admin/js/upfile.js" type="text/javascript"></script>

<!-- 配置文件 -->
<script type="text/javascript" src="__STATIC__/admin/hui/lib/ueditor/1.4.3/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="__STATIC__/admin/hui/lib/ueditor/1.4.3/ueditor.all.js"></script>

<script type="text/javascript">
    var ue = UE.getEditor('editor');
    $("[name='status'][value='{$data.status ?? ''}']").attr("checked", true);

    upload_image('image','','700','400','700');
    var URL = {
        uploader: '{:url('Upload/image')}',
        swf:'__STATIC__/admin/uploadify/uploadify.swf',
        ROOT:'__PUBLIC__/uploads/image',
    }
</script>
{/block}
{block name="main"}
<div class="page-container">

    <form class="form form-horizontal" action="{:url(\''.\\think\\Request::instance()->controller().'/save')}" id="form" method="post">

        <table class="table table-border table-bordered table-bg table-style">
            <thead>
            <tr>
                <th colspan="2" scope="col">填写信息</th>
            </tr>
            </thead>

            <tbody>
                <tr>
                    <th>
                        <span class="c-red">*</span>bbs标题：
                    </th>
                    <td>
                        <input type="text" class="input-text" value="{$data.title ?? ''}" placeholder="文章标题" name="title" datatype="*" nullmsg="请填写文章标题">
                    </td>
                </tr>

                <tr>
                    <th>
                        图片700*400：
                    </th>
                    <td>
                        <div id="image_s"><img src="__PUBLIC__/uploads/{$data.image ?'image/'.$data.image: 'sm_300.jpg'}" width="200px" height="200px"/></div>
                        <input id="image_post" name="image" type="hidden" value="{$data.image ?? ''}"/>
                        <input name="old_image" type="hidden" value="{$data.image ?? ''}"/>
                        <input id="image" name="image_upload" type="file" multiple="true">
                    </td>
                </tr>

                <tr>
                    <th>
                        简单描述：
                    </th>
                    <td class="textarea-valid">
                        <textarea name="miaoshu" cols="" rows="" class="input-text textarea" placeholder="说点什么...最少输入10个字符" dragonfly="true">{$data.miaoshu ?? ''}</textarea>
                    </td>
                </tr>

                <tr>
                    <th>
                        时间：
                    </th>
                    <td>
                        <input type="text" name="create_time" id="countTimeend" onfocus="selecttime(2)" class="input-text Wdate"
                               placeholder="创建时间"
                               style="width:140px;" value="{$data.create_time ?? ''}" size="17" class="date" readonly>
                    </td>
                </tr>
                <tr>
                    <th>
                        <span class="c-red">*</span>内容：
                    </th>
                    <td>
                        <script id="editor" type="text/plain" name="center" style="width:100%;height:400px;">{$data.center|default=''|html_entity_decode ?? ''}</script>
                    </td>
                </tr>

                    <tr>
                    <th>
                    <span class="c-red">*</span>审核：
                        </th>
                        <td>
                        <div class="radio-box">
                        <input type="radio" name="status" id="radio-1" value="0">
                        <label for="radio-1">未审核</label>
                        </div>
                        <div class="radio-box" style="padding-left: 0;">
                        <input type="radio" name="status" id="radio-0" value="1">
                        <label for="radio-0">通过</label>
                        </div>
                        <div class="radio-box">
                        <input type="radio" name="status" id="radio-2" value="2">
                        <label for="radio-1">不通过</label>
                        </div>
                        </td>
                        </tr>
                        <tr>
                        <th>不通过原因：
                    </th>
                    <td>
                    <textarea name="error" cols="" rows="" class="input-text textarea" placeholder="说点什么" dragonfly="true">{$data.error ?? ''}</textarea>

                    </td>
                    </tr>
            </tbody>

            <tfoot>
                <tr>
                    <th></th>
                    <td>
                        <input name="id" value="{$data.id ?? ''}"  type="hidden" />
                        {:token()}
                        <input class="btn radius btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
                        <input class="btn radius btn-default radius" type="reset" value="&nbsp;&nbsp;重置&nbsp;&nbsp;">
                        <!-- <button onClick="layer_close();" class="btn radius btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button> -->
                    </td>
                </tr>
            </tfoot>
        </table>

    </form>

</div>
{/block}